""" useful stuff for envlets """

def add_to_path(env, dirs):
    curpath = env["PATH"]

    addables = ";".join([d for d in dirs if d.lower() not in curpath.lower()])
    if not curpath.endswith(";") and curpath:
            curpath+=";"

    curpath+= addables

    env["PATH"] = curpath
